package com.knightcloud.micro.upms.api.feign;

import com.knightcloud.common.base.constants.ServiceNameConstants;
import com.knightcloud.common.base.vo.response.R;
import com.knightcloud.micro.upms.api.dto.SysUserDto;
import com.knightcloud.micro.upms.api.dto.SysUserInfoDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 远程用户服务
 *
 * @author knight
 */
@FeignClient(contextId = "RemoteUserService", value = ServiceNameConstants.UMPS_SERVICE)
public interface RemoteUserService {

	/**
	 * 根据用户名查询系统用户
	 * @param username 用户名
	 * @return {@link R}<{@link SysUserDto}>
	 */
	@GetMapping("/inner/user/username")
	R<SysUserDto> selectSysUserByUsername(@RequestParam("username") String username);

	/**
	 * 根据用户名查询系统用户信息
	 * @param username 用户名
	 * @return {@link R}<{@link SysUserDto}>
	 */
	@GetMapping("/inner/user/info/username")
	R<SysUserInfoDto> selectSysUserInfoByUsername(@RequestParam("username") String username);

}
